#!/bin/bash

dbname="recommendationengine"

mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -tdR $dbname > routines.sql
mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -d $dbname schema_migrations etl_dailylog etl_log user program programtype series seriestag userviewhistory userviewhistory_ii usertypepreference usertypepreference_ii usertagpreference usertagpreference_ii serieshottest modelhottest modellatest modelviewalso modelmanual modelmostsimilar modeluserfavorite seriesviewalso program_all incr_program series_all incr_series seriesactor category category_raw seriesmanual > recommendationengine.sql
perl -i -pe 's/AUTO_INCREMENT=\d+ //g' recommendationengine.sql
mysqldump -uroot -pmysql -h127.0.0.1 --default-character-set=utf8 -t $dbname programtype > data.sql
